[Deprecated] Creates or updates a Client (Shopper) in BSPK
curl --request POST \
--url https://api.bspk.com/api/platform/v1/clients \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"client": {
"shopper_ref": "CLI-789",
"first_name": "John",
"last_name": "Meyer",
"alternate_first_name": "Johnny",
"alternate_last_name": "Meyers",
"gender": "M",
"email": "client1@email.com",
"mobile_phone": "+5511987669944",
"other_phone": "+551154772457",
"address": "Av. Paulista, 1000",
"address_2": "10th floor",
"address_3": "Suite 100",
"address_4": "Building 1",
"city": "New York",
"state": "NY",
"zip_code": "10001",
"country_code": "US",
"segment": "VIP",
"preferred_contact_channel": "whatsapp",
"nationality": "US",
"passport_number": "AA0199929992",
"languages": "en;fr",
"email_contact": "true",
"phone_call_contact": "false",
"chat_contact": "false",
"do_not_contact": "false",
"interested_in_new_products": "true",
"birthday": "1982-02-22",
"creation_date": "01/05/2022",
"store_ref": "22",
"sales_associate_ref": "1101",
"preferences": "Young Professional; Lawyer",
"ignore_columns": "first_name;last_name",
"barcode": "1234567890123",
"profile_type": "person"
}
}
'import requests
url = "https://api.bspk.com/api/platform/v1/clients"
payload = { "client": {
"shopper_ref": "CLI-789",
"first_name": "John",
"last_name": "Meyer",
"alternate_first_name": "Johnny",
"alternate_last_name": "Meyers",
"gender": "M",
"email": "client1@email.com",
"mobile_phone": "+5511987669944",
"other_phone": "+551154772457",
"address": "Av. Paulista, 1000",
"address_2": "10th floor",
"address_3": "Suite 100",
"address_4": "Building 1",
"city": "New York",
"state": "NY",
"zip_code": "10001",
"country_code": "US",
"segment": "VIP",
"preferred_contact_channel": "whatsapp",
"nationality": "US",
"passport_number": "AA0199929992",
"languages": "en;fr",
"email_contact": "true",
"phone_call_contact": "false",
"chat_contact": "false",
"do_not_contact": "false",
"interested_in_new_products": "true",
"birthday": "1982-02-22",
"creation_date": "01/05/2022",
"store_ref": "22",
"sales_associate_ref": "1101",
"preferences": "Young Professional; Lawyer",
"ignore_columns": "first_name;last_name",
"barcode": "1234567890123",
"profile_type": "person"
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
client: {
shopper_ref: 'CLI-789',
first_name: 'John',
last_name: 'Meyer',
alternate_first_name: 'Johnny',
alternate_last_name: 'Meyers',
gender: 'M',
email: 'client1@email.com',
mobile_phone: '+5511987669944',
other_phone: '+551154772457',
address: 'Av. Paulista, 1000',
address_2: '10th floor',
address_3: 'Suite 100',
address_4: 'Building 1',
city: 'New York',
state: 'NY',
zip_code: '10001',
country_code: 'US',
segment: 'VIP',
preferred_contact_channel: 'whatsapp',
nationality: 'US',
passport_number: 'AA0199929992',
languages: 'en;fr',
email_contact: 'true',
phone_call_contact: 'false',
chat_contact: 'false',
do_not_contact: 'false',
interested_in_new_products: 'true',
birthday: '1982-02-22',
creation_date: '01/05/2022',
store_ref: '22',
sales_associate_ref: '1101',
preferences: 'Young Professional; Lawyer',
ignore_columns: 'first_name;last_name',
barcode: '1234567890123',
profile_type: 'person'
}
})
};
fetch('https://api.bspk.com/api/platform/v1/clients', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.bspk.com/api/platform/v1/clients",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'client' => [
'shopper_ref' => 'CLI-789',
'first_name' => 'John',
'last_name' => 'Meyer',
'alternate_first_name' => 'Johnny',
'alternate_last_name' => 'Meyers',
'gender' => 'M',
'email' => 'client1@email.com',
'mobile_phone' => '+5511987669944',
'other_phone' => '+551154772457',
'address' => 'Av. Paulista, 1000',
'address_2' => '10th floor',
'address_3' => 'Suite 100',
'address_4' => 'Building 1',
'city' => 'New York',
'state' => 'NY',
'zip_code' => '10001',
'country_code' => 'US',
'segment' => 'VIP',
'preferred_contact_channel' => 'whatsapp',
'nationality' => 'US',
'passport_number' => 'AA0199929992',
'languages' => 'en;fr',
'email_contact' => 'true',
'phone_call_contact' => 'false',
'chat_contact' => 'false',
'do_not_contact' => 'false',
'interested_in_new_products' => 'true',
'birthday' => '1982-02-22',
'creation_date' => '01/05/2022',
'store_ref' => '22',
'sales_associate_ref' => '1101',
'preferences' => 'Young Professional; Lawyer',
'ignore_columns' => 'first_name;last_name',
'barcode' => '1234567890123',
'profile_type' => 'person'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.bspk.com/api/platform/v1/clients"
payload := strings.NewReader("{\n \"client\": {\n \"shopper_ref\": \"CLI-789\",\n \"first_name\": \"John\",\n \"last_name\": \"Meyer\",\n \"alternate_first_name\": \"Johnny\",\n \"alternate_last_name\": \"Meyers\",\n \"gender\": \"M\",\n \"email\": \"client1@email.com\",\n \"mobile_phone\": \"+5511987669944\",\n \"other_phone\": \"+551154772457\",\n \"address\": \"Av. Paulista, 1000\",\n \"address_2\": \"10th floor\",\n \"address_3\": \"Suite 100\",\n \"address_4\": \"Building 1\",\n \"city\": \"New York\",\n \"state\": \"NY\",\n \"zip_code\": \"10001\",\n \"country_code\": \"US\",\n \"segment\": \"VIP\",\n \"preferred_contact_channel\": \"whatsapp\",\n \"nationality\": \"US\",\n \"passport_number\": \"AA0199929992\",\n \"languages\": \"en;fr\",\n \"email_contact\": \"true\",\n \"phone_call_contact\": \"false\",\n \"chat_contact\": \"false\",\n \"do_not_contact\": \"false\",\n \"interested_in_new_products\": \"true\",\n \"birthday\": \"1982-02-22\",\n \"creation_date\": \"01/05/2022\",\n \"store_ref\": \"22\",\n \"sales_associate_ref\": \"1101\",\n \"preferences\": \"Young Professional; Lawyer\",\n \"ignore_columns\": \"first_name;last_name\",\n \"barcode\": \"1234567890123\",\n \"profile_type\": \"person\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.bspk.com/api/platform/v1/clients")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"client\": {\n \"shopper_ref\": \"CLI-789\",\n \"first_name\": \"John\",\n \"last_name\": \"Meyer\",\n \"alternate_first_name\": \"Johnny\",\n \"alternate_last_name\": \"Meyers\",\n \"gender\": \"M\",\n \"email\": \"client1@email.com\",\n \"mobile_phone\": \"+5511987669944\",\n \"other_phone\": \"+551154772457\",\n \"address\": \"Av. Paulista, 1000\",\n \"address_2\": \"10th floor\",\n \"address_3\": \"Suite 100\",\n \"address_4\": \"Building 1\",\n \"city\": \"New York\",\n \"state\": \"NY\",\n \"zip_code\": \"10001\",\n \"country_code\": \"US\",\n \"segment\": \"VIP\",\n \"preferred_contact_channel\": \"whatsapp\",\n \"nationality\": \"US\",\n \"passport_number\": \"AA0199929992\",\n \"languages\": \"en;fr\",\n \"email_contact\": \"true\",\n \"phone_call_contact\": \"false\",\n \"chat_contact\": \"false\",\n \"do_not_contact\": \"false\",\n \"interested_in_new_products\": \"true\",\n \"birthday\": \"1982-02-22\",\n \"creation_date\": \"01/05/2022\",\n \"store_ref\": \"22\",\n \"sales_associate_ref\": \"1101\",\n \"preferences\": \"Young Professional; Lawyer\",\n \"ignore_columns\": \"first_name;last_name\",\n \"barcode\": \"1234567890123\",\n \"profile_type\": \"person\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bspk.com/api/platform/v1/clients")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"client\": {\n \"shopper_ref\": \"CLI-789\",\n \"first_name\": \"John\",\n \"last_name\": \"Meyer\",\n \"alternate_first_name\": \"Johnny\",\n \"alternate_last_name\": \"Meyers\",\n \"gender\": \"M\",\n \"email\": \"client1@email.com\",\n \"mobile_phone\": \"+5511987669944\",\n \"other_phone\": \"+551154772457\",\n \"address\": \"Av. Paulista, 1000\",\n \"address_2\": \"10th floor\",\n \"address_3\": \"Suite 100\",\n \"address_4\": \"Building 1\",\n \"city\": \"New York\",\n \"state\": \"NY\",\n \"zip_code\": \"10001\",\n \"country_code\": \"US\",\n \"segment\": \"VIP\",\n \"preferred_contact_channel\": \"whatsapp\",\n \"nationality\": \"US\",\n \"passport_number\": \"AA0199929992\",\n \"languages\": \"en;fr\",\n \"email_contact\": \"true\",\n \"phone_call_contact\": \"false\",\n \"chat_contact\": \"false\",\n \"do_not_contact\": \"false\",\n \"interested_in_new_products\": \"true\",\n \"birthday\": \"1982-02-22\",\n \"creation_date\": \"01/05/2022\",\n \"store_ref\": \"22\",\n \"sales_associate_ref\": \"1101\",\n \"preferences\": \"Young Professional; Lawyer\",\n \"ignore_columns\": \"first_name;last_name\",\n \"barcode\": \"1234567890123\",\n \"profile_type\": \"person\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"external_id": "<string>",
"warnings": [
"<string>"
],
"updated_at": "<string>",
"created_at": "<string>"
}Clients
[Deprecated] Creates or updates a Client (Shopper) in BSPK
Creates or updates a Shopper in BSPK
POST
/
api
/
platform
/
v1
/
clients
[Deprecated] Creates or updates a Client (Shopper) in BSPK
curl --request POST \
--url https://api.bspk.com/api/platform/v1/clients \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"client": {
"shopper_ref": "CLI-789",
"first_name": "John",
"last_name": "Meyer",
"alternate_first_name": "Johnny",
"alternate_last_name": "Meyers",
"gender": "M",
"email": "client1@email.com",
"mobile_phone": "+5511987669944",
"other_phone": "+551154772457",
"address": "Av. Paulista, 1000",
"address_2": "10th floor",
"address_3": "Suite 100",
"address_4": "Building 1",
"city": "New York",
"state": "NY",
"zip_code": "10001",
"country_code": "US",
"segment": "VIP",
"preferred_contact_channel": "whatsapp",
"nationality": "US",
"passport_number": "AA0199929992",
"languages": "en;fr",
"email_contact": "true",
"phone_call_contact": "false",
"chat_contact": "false",
"do_not_contact": "false",
"interested_in_new_products": "true",
"birthday": "1982-02-22",
"creation_date": "01/05/2022",
"store_ref": "22",
"sales_associate_ref": "1101",
"preferences": "Young Professional; Lawyer",
"ignore_columns": "first_name;last_name",
"barcode": "1234567890123",
"profile_type": "person"
}
}
'import requests
url = "https://api.bspk.com/api/platform/v1/clients"
payload = { "client": {
"shopper_ref": "CLI-789",
"first_name": "John",
"last_name": "Meyer",
"alternate_first_name": "Johnny",
"alternate_last_name": "Meyers",
"gender": "M",
"email": "client1@email.com",
"mobile_phone": "+5511987669944",
"other_phone": "+551154772457",
"address": "Av. Paulista, 1000",
"address_2": "10th floor",
"address_3": "Suite 100",
"address_4": "Building 1",
"city": "New York",
"state": "NY",
"zip_code": "10001",
"country_code": "US",
"segment": "VIP",
"preferred_contact_channel": "whatsapp",
"nationality": "US",
"passport_number": "AA0199929992",
"languages": "en;fr",
"email_contact": "true",
"phone_call_contact": "false",
"chat_contact": "false",
"do_not_contact": "false",
"interested_in_new_products": "true",
"birthday": "1982-02-22",
"creation_date": "01/05/2022",
"store_ref": "22",
"sales_associate_ref": "1101",
"preferences": "Young Professional; Lawyer",
"ignore_columns": "first_name;last_name",
"barcode": "1234567890123",
"profile_type": "person"
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
client: {
shopper_ref: 'CLI-789',
first_name: 'John',
last_name: 'Meyer',
alternate_first_name: 'Johnny',
alternate_last_name: 'Meyers',
gender: 'M',
email: 'client1@email.com',
mobile_phone: '+5511987669944',
other_phone: '+551154772457',
address: 'Av. Paulista, 1000',
address_2: '10th floor',
address_3: 'Suite 100',
address_4: 'Building 1',
city: 'New York',
state: 'NY',
zip_code: '10001',
country_code: 'US',
segment: 'VIP',
preferred_contact_channel: 'whatsapp',
nationality: 'US',
passport_number: 'AA0199929992',
languages: 'en;fr',
email_contact: 'true',
phone_call_contact: 'false',
chat_contact: 'false',
do_not_contact: 'false',
interested_in_new_products: 'true',
birthday: '1982-02-22',
creation_date: '01/05/2022',
store_ref: '22',
sales_associate_ref: '1101',
preferences: 'Young Professional; Lawyer',
ignore_columns: 'first_name;last_name',
barcode: '1234567890123',
profile_type: 'person'
}
})
};
fetch('https://api.bspk.com/api/platform/v1/clients', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.bspk.com/api/platform/v1/clients",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'client' => [
'shopper_ref' => 'CLI-789',
'first_name' => 'John',
'last_name' => 'Meyer',
'alternate_first_name' => 'Johnny',
'alternate_last_name' => 'Meyers',
'gender' => 'M',
'email' => 'client1@email.com',
'mobile_phone' => '+5511987669944',
'other_phone' => '+551154772457',
'address' => 'Av. Paulista, 1000',
'address_2' => '10th floor',
'address_3' => 'Suite 100',
'address_4' => 'Building 1',
'city' => 'New York',
'state' => 'NY',
'zip_code' => '10001',
'country_code' => 'US',
'segment' => 'VIP',
'preferred_contact_channel' => 'whatsapp',
'nationality' => 'US',
'passport_number' => 'AA0199929992',
'languages' => 'en;fr',
'email_contact' => 'true',
'phone_call_contact' => 'false',
'chat_contact' => 'false',
'do_not_contact' => 'false',
'interested_in_new_products' => 'true',
'birthday' => '1982-02-22',
'creation_date' => '01/05/2022',
'store_ref' => '22',
'sales_associate_ref' => '1101',
'preferences' => 'Young Professional; Lawyer',
'ignore_columns' => 'first_name;last_name',
'barcode' => '1234567890123',
'profile_type' => 'person'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.bspk.com/api/platform/v1/clients"
payload := strings.NewReader("{\n \"client\": {\n \"shopper_ref\": \"CLI-789\",\n \"first_name\": \"John\",\n \"last_name\": \"Meyer\",\n \"alternate_first_name\": \"Johnny\",\n \"alternate_last_name\": \"Meyers\",\n \"gender\": \"M\",\n \"email\": \"client1@email.com\",\n \"mobile_phone\": \"+5511987669944\",\n \"other_phone\": \"+551154772457\",\n \"address\": \"Av. Paulista, 1000\",\n \"address_2\": \"10th floor\",\n \"address_3\": \"Suite 100\",\n \"address_4\": \"Building 1\",\n \"city\": \"New York\",\n \"state\": \"NY\",\n \"zip_code\": \"10001\",\n \"country_code\": \"US\",\n \"segment\": \"VIP\",\n \"preferred_contact_channel\": \"whatsapp\",\n \"nationality\": \"US\",\n \"passport_number\": \"AA0199929992\",\n \"languages\": \"en;fr\",\n \"email_contact\": \"true\",\n \"phone_call_contact\": \"false\",\n \"chat_contact\": \"false\",\n \"do_not_contact\": \"false\",\n \"interested_in_new_products\": \"true\",\n \"birthday\": \"1982-02-22\",\n \"creation_date\": \"01/05/2022\",\n \"store_ref\": \"22\",\n \"sales_associate_ref\": \"1101\",\n \"preferences\": \"Young Professional; Lawyer\",\n \"ignore_columns\": \"first_name;last_name\",\n \"barcode\": \"1234567890123\",\n \"profile_type\": \"person\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.bspk.com/api/platform/v1/clients")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"client\": {\n \"shopper_ref\": \"CLI-789\",\n \"first_name\": \"John\",\n \"last_name\": \"Meyer\",\n \"alternate_first_name\": \"Johnny\",\n \"alternate_last_name\": \"Meyers\",\n \"gender\": \"M\",\n \"email\": \"client1@email.com\",\n \"mobile_phone\": \"+5511987669944\",\n \"other_phone\": \"+551154772457\",\n \"address\": \"Av. Paulista, 1000\",\n \"address_2\": \"10th floor\",\n \"address_3\": \"Suite 100\",\n \"address_4\": \"Building 1\",\n \"city\": \"New York\",\n \"state\": \"NY\",\n \"zip_code\": \"10001\",\n \"country_code\": \"US\",\n \"segment\": \"VIP\",\n \"preferred_contact_channel\": \"whatsapp\",\n \"nationality\": \"US\",\n \"passport_number\": \"AA0199929992\",\n \"languages\": \"en;fr\",\n \"email_contact\": \"true\",\n \"phone_call_contact\": \"false\",\n \"chat_contact\": \"false\",\n \"do_not_contact\": \"false\",\n \"interested_in_new_products\": \"true\",\n \"birthday\": \"1982-02-22\",\n \"creation_date\": \"01/05/2022\",\n \"store_ref\": \"22\",\n \"sales_associate_ref\": \"1101\",\n \"preferences\": \"Young Professional; Lawyer\",\n \"ignore_columns\": \"first_name;last_name\",\n \"barcode\": \"1234567890123\",\n \"profile_type\": \"person\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bspk.com/api/platform/v1/clients")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"client\": {\n \"shopper_ref\": \"CLI-789\",\n \"first_name\": \"John\",\n \"last_name\": \"Meyer\",\n \"alternate_first_name\": \"Johnny\",\n \"alternate_last_name\": \"Meyers\",\n \"gender\": \"M\",\n \"email\": \"client1@email.com\",\n \"mobile_phone\": \"+5511987669944\",\n \"other_phone\": \"+551154772457\",\n \"address\": \"Av. Paulista, 1000\",\n \"address_2\": \"10th floor\",\n \"address_3\": \"Suite 100\",\n \"address_4\": \"Building 1\",\n \"city\": \"New York\",\n \"state\": \"NY\",\n \"zip_code\": \"10001\",\n \"country_code\": \"US\",\n \"segment\": \"VIP\",\n \"preferred_contact_channel\": \"whatsapp\",\n \"nationality\": \"US\",\n \"passport_number\": \"AA0199929992\",\n \"languages\": \"en;fr\",\n \"email_contact\": \"true\",\n \"phone_call_contact\": \"false\",\n \"chat_contact\": \"false\",\n \"do_not_contact\": \"false\",\n \"interested_in_new_products\": \"true\",\n \"birthday\": \"1982-02-22\",\n \"creation_date\": \"01/05/2022\",\n \"store_ref\": \"22\",\n \"sales_associate_ref\": \"1101\",\n \"preferences\": \"Young Professional; Lawyer\",\n \"ignore_columns\": \"first_name;last_name\",\n \"barcode\": \"1234567890123\",\n \"profile_type\": \"person\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"external_id": "<string>",
"warnings": [
"<string>"
],
"updated_at": "<string>",
"created_at": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Show child attributes
Show child attributes
⌘I
